<#import "../../../widgets/pager.htm" as q>
<#assign contextPath = request.contextPath/>
<#assign webtitle = "Wanglim 养生保健驿站"/> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>首页</title>
<script src="${request.contextPath}/resources/style/js/sdmenu.js" ></script>
<script src="${request.contextPath}/resources/style/js/jquery/jquery-1.7.1.min.js" ></script>
<link href="${request.contextPath}/resources/style/css/css.css" rel="stylesheet" type="text/css"/>
<link href="${request.contextPath}/resources/style/css/window.css" rel="stylesheet" type="text/css"/>

<script src="${request.contextPath}/resources/style/js/bootstrap.min.js" ></script>
<link href="${request.contextPath}/resources/style/css/bootstrap.css?1" rel="stylesheet" type="text/css"/>
</head>
<body>
<#include "../top.htm">
<div class="hide-top">
</div>
<#include "../leftMenu.htm">
<div class="main float-left" align='center'>
		<div class='main-info' style='width:90%;'  align='left'>
				<div class="help-main">
					 <table>
						<tr>
							<td>
								<ul class='help-menu'  style="width:150px">
									<li><a href="#" class='clickUrl'>帮助选项</a></li>
									<li><a href="#">帮助选项</a></li>
									<li><a href="#">帮助选项</a></li>
									<li><a href="#">帮助选项</a></li>
								</ul>
							</td>
							<td><div class='help-info'>									您也可以一次删除/回收多个文件。使用文章左侧的复选框，选择您需要操作的文件，然后从“批量操作”下拉菜单中选择您的操作类型。点击“应用”，操作即生效。在使用”批量编辑“时，您可以一次编辑这些文章的多个属性（分类目录、作者等）。要从待编辑文章中移除某篇，请在”批量编辑“区域中点击其标题旁边的“x”。
								</div>
							</td>
						</tr>
					</table>
				</div>
				<div class="float-right help-div"> 帮助</div>
				
				<div style="padding-top:10px"><font class="font-size1">文章</font></div>
				<div  class='text-right'>
				
				<input type="text" class="form-horizontal" placeholder="搜索"/>
					 <input class="input" value="搜&nbsp;索" type="button"/> 
				</div>
				<div  class='text-left'>
					<div>
						选择分类：
						<select name="forumsid" onchange="changeForum(this.value)" style='width:150px'>
						<option value=''>选择分类</option>
							 <#if categorys??>
								<#list categorys as category>	
										<option disabled="disabled" value="${category.categoryid}">${category.name}</option>
										 <#if forums??>
											<#list forums as forum>	
											 	<#if forum.categoryid=category.categoryid>
												<option class='forums-list' value="${forum.forumsid}">&nbsp;&nbsp;&nbsp;${forum.name}</option>
												 </#if>
											</#list>
						   				 </#if>
								</#list>
						    </#if>
							<option>法律</option>
						</select>
					</div> 
				</div>	 
				 <br/>
				<div class='data-list' >
				   <table style='width:100%;' class='table table-striped'>
					 <tr>
						<th width='20%'>名称</th><th width='20%'>作者</th><th  width='20%' >分类目录</th><th  width='20%' >可见性</th><th  width='20%' >评分</th>
					 </tr>
					  	<#if page.result??>
							<#list page.result as posts>
							 <tr>
								<td><div class='data'>${posts.posttitle} </div>
								 <div class='handle'><span class="handle-info"><a href="${request.contextPath}/admin/post/delete/${posts.postsid}">删除</a>|<a href="${request.contextPath}/admin/post/update/${posts.postsid}">编辑</a></span>&nbsp;
								</div>
								</td>
								<td>${posts.authorName}</td><td>${(posts.forumName)?default("")}</td><td>是</td><td>0</td>
							 </tr>
							</#list>
					</#if>
				 </table>
				 <#if page.totalCount??>
					   <@q.pager pageNo=page.pageNumber pageSize=page.pageSize recordCount=page.totalCount toURL=page.toUrl/>
				 </#if> 
			</div>	
		</div>
	</div>
</body>
</html>
<script type="text/javascript">
	// <![CDATA[
	var myMenu;
	window.onload = function() {
		myMenu = new SDMenu("my_menu");
		myMenu.init();
		var firstSubmenu = myMenu.submenus[0];
		myMenu.expandMenu(firstSubmenu);
	};
		if(jQuery(window).height()>960){
			jQuery('.main').width('960px');
		}else{
		  jQuery('.main').width(jQuery(window).width()-140);
		}
		jQuery('.menu').height(jQuery('.main').height());
		jQuery(function(){
			jQuery('.help-div').click(function(){
				jQuery('.help-main').toggle();
			})
			jQuery('div.main .data-list  table td').hover(function(){
				jQuery(this).find('.handle-info').toggle();
			})
		})
		function changeForum(id){
			window.location.href="./findPosts.htm?forumsid="+id;
		}
		<#if posts.forumsid??>
			jQuery(".forums-list[value='${posts.forumsid}']").attr('selected','selected');
		</#if>
	// ]]>
	</script>
		<#include "../../../widgets/googleAnalytics.htm">